<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>文章详细内容</title>
<link rel="stylesheet" type="text/css" href="../Public/discuss/css/interface.css" />
<script type="text/javascript" src="../Public/js/jquery-1.7.1.min.js"></script>
<script type="text/javascript">
$(document).ready(function(){  
    $("#comm").keydown(function(){  
        var curLength=$("#comm").val().length;   
        if(curLength>=50){  
            var num=$("#comm").val().substr(0,50);  
            $("#comm").val(num);  
            alert("超过字数限制，多出的字将被截断!");  
        }  
        else{  
            var no = $("#comm").val().length+1;
            no=no+"/50";
            $("#textCount").text(no);  
        }  
    })  
});

function addComm(){   
    var comm=$("#comm").val();    
    var aid=$("#aid").val();  
    $.post("{:U('Discuss/addcomment')}",{comm:comm,aid:aid},function(data){
        if(data!=""){
            var url="detail/deid/"+aid;
            window.location.href="{:U('"+url+"')}";
        }else{
            alert("添加失败！")
        }
      //  var jsonObj = $.parseJSON(data);
//        $('#commpart').append("<div class='one' id='disName' style='width:15%;color:#0000ff;'>"
//         +jsonObj.data['p_name']+"</div><div class='one' id='disContent' style='width:60%;'>"
//         +jsonObj.data['content']+"</div><div class='one' id='disTime' style='width:15%;text-align: right;font-size:6pt;font-style:oblique;'>"
//         +jsonObj.info+"</div>");
//        $('#comm').attr('value','');    
    });
}
function toChild(uid){
  var url = 'toChild/uid/'+uid;
  window.location.href = "{:U('"+url+"')}";
}
function toAllAlticle(pid){
  var url = 'toOneArticle/pid/'+pid;
  window.location.href = "{:U('"+url+"')}";
}


</script>
</head>
<body>
<div style="margin-top:2%;width:100%;">
	<div style="float:left;width:67%;">
  <!--标题栏开始-->  
		<div style="width:90%;height:40px; background:#ecf9fe; border: thin solid #dee3e3; margin-top:10px;">
			<div class="tab setab" style="width:120px;">Tang话题</div>
		</div>
      <!--标题栏结束-->  
 	 <!--最左区域-->
		<div class="myfontstyle"  style="width:90%;background:#f7fcfe;border-top:none;border:thin solid #dee3e3;"> 
	
<!--讨论题开始-->
     <input type="text" id="aid" name="aid" value="{$list.id}" style="display: none;" />
			<div style="width:95%;margin-left:20px;margin-top:30px; height:100px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
            	<div class="myfontstyle" style="float:left;width:100%">
                	<div style="float:left;width:15%;">
                    	<div style="height:91px;width:84px;"><img src="../Public/upload/head/{$parent.picture}" style=" height:91px;width:84px;cursor: pointer;" onclick="toAllAlticle({$parent.p_id})" /></div>
                    </div>
                    <div style="float:right;width:85%;">
                    	<div style="width:100%;height:36px;">
                    		<div id="ntitle" style="float:left;background:url(../Public/discuss/image/m_greenline.png) repeat-x left bottom;width:100%;height:36px; line-height:36px;color:#047f80;font-weight:bold;font-size:14pt;margin-left:2%;">{$list.title}</div>
                        	<div id='nwriter' style="float:left;background:url(../Public/discuss/image/greenline.png) no-repeat left bottom;font-style:oblique;"></div>
                    	</div>    
                    	<div style="height:50px;width:100%;font-size:10pt;color:#8b8c8e;padding-top:10px;margin-left:2%;">
                        <div class="myfontstyle"><span style="cursor: pointer;color:#047f80;" onclick="toAllAlticle({$parent.p_id})">{$parent.nick}</span> &emsp;{$list.wtime}</div>
                        <div class="myfontstyle" >孩子：
                        <volist name="user" id ="child">
                        <a href="#" style="cursor:pointer;color:#047f80;" onclick="toChild({$child.u_id})">{$child.name}</a>
                        </volist>
                        </div>
                        </div>
                    </div>
                </div>
            </div>
   
<!--讨论题结束-->
<!--详细介绍开始-->
			<div style="width:95%;margin-left:20px;height:200px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
            	<div style="float:left;width:100%">
                    <div style="float:right;width:100%;height:200px;">                      
                    	<div id="ncontent" style="height:200px;width:100%;font-size:12pt;color:#8b8c8e;padding-top:10px;">&emsp;{$list.content}</div>
                    </div>
                </div>
            </div>
<!--详细介绍结束-->
<!--评论列表开始-->
			<div style="width:95%;margin-left:20px;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">
            	<div style="float:left;width:100%;background:url(../Public/discuss/image/line.png) repeat-x left bottom;">            	
                    <div style="float:right;width:99%;"> 
                     <!--添加评论局部刷新-->
                      <div class="myfontstyle" id="commpart">
                          <volist name="CommentList" id="vo">
                            <div class="one" style="width:10%;font-size:10pt;color:#047f80;cursor:pointer;" onclick="toChild()">{$vo.p_name}</div>
                            <div class="one" style="width:63%;font-size:10pt;">{$vo.content}</div>
                            <div class="one" style="width:20%;text-align: right;font-size:6pt;font-style:oblique;">{$vo.ptime}</div>
                         </volist> 
                           <div class="myfontstyle" id="pageid" style="float:right;width:100%;clear:both;font-size:6pt;text-align:center;height:25px;">{$page}</div>   
                      </div>
                      <!--添加评论局部刷新结束-->                  	
                    </div>
                </div>
            </div>
<!--评论列表结束-->
<!--评论栏开始-->    
			<div style="width:95%;margin-left:20px;height:60px; clear:both;">
            	<div style="float:left;width:100%">
                	<div style="float:left;width:15%;height:50px;">
                    	<div style="background:url(../Public/discuss/image/review.png) no-repeat;width:61px;height:28px;cursor:pointer;" onclick="addComm()"></div>
                    </div>
                    <div style="float:right;width:85%;height:50px;">                      
                    	<textarea id="comm" name="comm" style="width:95%;height:34px;" ></textarea>
                        <div style="margin-top:2px; float:left;width:45px;height:14px;line-heght:14px;font-size:10pt;text-align:right;color:#9b9b9b;cursor:pointer;"><span id="textCount" class="myfontstyle">0/50</span></div>
                        
                    </div>
                </div>
            </div>
<!--评论栏结束-->
        </div><!--最左区域-->	  
   </div><!--内容结束-->
   
<div style="float:left;width:3%;background:url(../Public/discuss/image/m_line.png) no-repeat right center;height:600px; "></div><!--中线-->
<!--公告开始-->
<div style="float:left;width:25%;">
	<div style="background:url(../Public/discuss/image/back.png) no-repeat;width:207px;height:218px;margin-top:20px;padding-top:50px;">
    <!--	<div class="myfontstyle" style="width:80%;color:#A0A0A0;font-size:10pt;">&nbsp;&nbsp;Tang话题是供家长们互相交流的地方，话题是固定的，不能被随意发起，因为它们必须被确定是与宝宝有关，Tang崇尚一切以宝宝为中心，当然，如果您急切的希望与Tang所有的家长们交流某一个话题，请发邮件告诉Tang Team.
    </div>-->
</div>
<!--公告结束-->
</div><!--全局框结束-->      
<img src="../Public/discuss/image/flower.png" style="position:absolute;right:0;bottom:0; z-index:-50;" />	
</body>
</html>
